square and cube in python